package com.fingard.dsp.bank.directbank.nnbill01.wsdl.gateway;

import java.net.URL;
import java.rmi.Remote;
import java.util.HashSet;
import java.util.Iterator;

import javax.xml.namespace.QName;
import javax.xml.rpc.ServiceException;

public class GatewayOrderQueryServiceLocator extends org.apache.axis.client.Service implements GatewayOrderQueryService {
	private static final long serialVersionUID = 5693818508517182540L;

	public GatewayOrderQueryServiceLocator() {
    }

	public GatewayOrderQueryServiceLocator(String url) {
		gatewayOrderQuery_address = url;
    }
	
    public GatewayOrderQueryServiceLocator(org.apache.axis.EngineConfiguration config) {
        super(config);
    }

    public GatewayOrderQueryServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
        super(wsdlLoc, sName);
    }

    private String gatewayOrderQuery_address = "http://sandbox.99bill.com/apipay/services/gatewayOrderQuery";

    public String getgatewayOrderQueryAddress() {
        return gatewayOrderQuery_address;
    }

    private String gatewayOrderQueryWSDDServiceName = "gatewayOrderQuery";

    public String getgatewayOrderQueryWSDDServiceName() {
        return gatewayOrderQueryWSDDServiceName;
    }

    public void setgatewayOrderQueryWSDDServiceName(java.lang.String name) {
        gatewayOrderQueryWSDDServiceName = name;
    }

    public GatewayOrderQuery getgatewayOrderQuery() throws ServiceException {
       java.net.URL endpoint;
        try {
            endpoint = new java.net.URL(gatewayOrderQuery_address);
        }
        catch (java.net.MalformedURLException e) {
            throw new javax.xml.rpc.ServiceException(e);
        }
        return getgatewayOrderQuery(endpoint);
    }

    public GatewayOrderQuery getgatewayOrderQuery(URL portAddress) throws ServiceException {
        try {
        	GatewayOrderQuerySoapBindingStub _stub = new GatewayOrderQuerySoapBindingStub(portAddress, this);
            _stub.setPortName(getgatewayOrderQueryWSDDServiceName());
            return _stub;
        }
        catch (org.apache.axis.AxisFault e) {
            return null;
        }
    }

    public void setgatewayOrderQueryEndpointAddress(java.lang.String address) {
        gatewayOrderQuery_address = address;
    }

    public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        try {
        	if (GatewayOrderQuery.class.isAssignableFrom(serviceEndpointInterface)) {
                GatewayOrderQuerySoapBindingStub _stub = new GatewayOrderQuerySoapBindingStub(new java.net.URL(gatewayOrderQuery_address), this);
                _stub.setPortName(getgatewayOrderQueryWSDDServiceName());
                return (Remote) _stub;
            }
        }
        catch (java.lang.Throwable t) {
            throw new javax.xml.rpc.ServiceException(t);
        }
        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
    }

    public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        if (portName == null) {
            return getPort(serviceEndpointInterface);
        }
        java.lang.String inputPortName = portName.getLocalPart();
        if ("gatewayOrderQuery".equals(inputPortName)) {
        	 return getgatewayOrderQuery();
        }
        else  {
            java.rmi.Remote _stub = getPort(serviceEndpointInterface);
            ((org.apache.axis.client.Stub) _stub).setPortName(portName);
            return _stub;
        }
    }

    public javax.xml.namespace.QName getServiceName() {
        return new javax.xml.namespace.QName("http://sandbox.99bill.com/apipay/services/gatewayOrderQuery", "GatewayOrderQueryService");
    }

    private HashSet ports = null;

    public Iterator getPorts() {
        if (ports == null) {
            ports = new HashSet();
            ports.add(new QName("http://sandbox.99bill.com/apipay/services/gatewayOrderQuery", "gatewayOrderQuery"));
        }
        return ports.iterator();
    }

    /**
    * Set the endpoint address for the specified port name.
    */
    public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
        
if ("gatewayOrderQuery".equals(portName)) {
            setgatewayOrderQueryEndpointAddress(address);
        }
        else 
{ 
            throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
        }
    }

    /**
    * Set the endpoint address for the specified port name.
    */
    public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
        setEndpointAddress(portName.getLocalPart(), address);
    }

}
